<template>
  <div class="swiper">
    <el-carousel trigger="click"  indicator-position=''>
      <!-- <el-carousel-item v-for="(item,index) in banners" :key="index">
        <a :href="banners[index].link">
        <img :src="banners[index].image" alt="">
        </a>
      </el-carousel-item> -->
      <slot></slot>
    </el-carousel>
  </div>
</template>

<script>
import {getHomeMultidata} from '@/network/home.js'
export default {
  name: 'Swiper',

  data() {
    return {
      banners:null,
      recommends:null
      // img_list: [
      //   {id:0,idView:require('@/assets/img/home/1.jpg')},
      //   {id:1,idView:require('@/assets/img/home/2.jpg')},
      //   {id:2,idView:require('@/assets/img/home/3.jpg')},
      //   {id:3,idView:require('@/assets/img/home/4.jpg')},
      // ],
    };
  },

  mounted() {
    
  },

  methods: {
  },
  created(){
    // 1.请求多个数据
    // getHomeMultidata().then(res=>{
    //   this.banners=res.data.banner.list;
    //   this.recommends=res.data.recommend.list;
    //   console.log(this.banners);
    // })
  }
};
</script>

<style lang="css" scoped>
.el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 150px;
    margin: 0;
  }
 
  .el-carousel__item:nth-child(2n) {
     background-color: #99a9bf;
  }
  
  .el-carousel__item:nth-child(2n+1) {
     background-color: #d3dce6;
  } 

  .swiper >>> .el-carousel__button{
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }
  
</style>